package Test;

import java.io.IOException;

import DataOperator.BaseImporter;
import DataOperator.BookPackager;
import DataOperator.Builder;
import DataOperator.Builder.BuildMode;
import DataOperator.IDSPackager;
import DataOperator.OxfordImporter;

public class Test {
	
	static void TestBuild(){
		try{
			IDSPackager packager = new IDSPackager();
			OxfordImporter importer = new OxfordImporter("InputDict.txt", "WordList.txt");
			Builder builder = new Builder(importer, packager, BuildMode.AllMode);
			builder.Build();
		}
		catch(IOException e){
			e.printStackTrace();
		}	
	}
	
	static void TestSimBuild(){
		try{
			IDSPackager packager = new IDSPackager();
			BaseImporter importer = new BaseImporter("", "");
			Builder builder = new Builder(importer, packager, BuildMode.AllMode);
			builder.Build();
		}
		catch(IOException e){
			e.printStackTrace();
		}	
	}
	
	static void TestBookBuild(){
		try{
			Builder builder = new Builder(new BaseImporter("SimDict.txt", ""), 
					new BookPackager(), BuildMode.AllMode);
			builder.Build();
		}
		catch(IOException e){
			e.printStackTrace();
		}
	}
	
	static public void main(String args[]){
		TestBookBuild();
		//TestBuild();
		//TestLoad();
	}
}
